Integrand size = 21, antiderivative size = 169 \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=-\frac {\left (b c d-b^2 e+a c e\right ) x}{c^3}+\frac {(c d-b e) x^2}{2 c^2}+\frac {e x^3}{3 c}+\frac {\left (b^3 c d-3 a b c^2 d-b^4 e+4 a b^2 c e-2 a^2 c^2 e\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c}}+\frac {\left (b^2 c d-a c^2 d-b^3 e+2 a b c e\right ) \log \left (a+b x+c x^2\right )}{2 c^4} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {814, 648, 632, 212, 642} \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (-2 a^2 c^2 e+4 a b^2 c e-3 a b c^2 d+b^4 (-e)+b^3 c d\right )}{c^4 \sqrt {b^2-4 a c}}-\frac {x \left (a c e+b^2 (-e)+b c d\right )}{c^3}+\frac {\left (2 a b c e-a c^2 d+b^3 (-e)+b^2 c d\right ) \log \left (a+b x+c x^2\right )}{2 c^4}+\frac {x^2 (c d-b e)}{2 c^2}+\frac {e x^3}{3 c} \]
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 814
Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {b c d-b^2 e+a c e}{c^3}+\frac {(c d-b e) x}{c^2}+\frac {e x^2}{c}+\frac {a \left (b c d-b^2 e+a c e\right )+\left (b^2 c d-a c^2 d-b^3 e+2 a b c e\right ) x}{c^3 \left (a+b x+c x^2\right )}\right ) \, dx \\ & = -\frac {\left (b c d-b^2 e+a c e\right ) x}{c^3}+\frac {(c d-b e) x^2}{2 c^2}+\frac {e x^3}{3 c}+\frac {\int \frac {a \left (b c d-b^2 e+a c e\right )+\left (b^2 c d-a c^2 d-b^3 e+2 a b c e\right ) x}{a+b x+c x^2} \, dx}{c^3} \\ & = -\frac {\left (b c d-b^2 e+a c e\right ) x}{c^3}+\frac {(c d-b e) x^2}{2 c^2}+\frac {e x^3}{3 c}+\frac {\left (b^2 c d-a c^2 d-b^3 e+2 a b c e\right ) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 c^4}-\frac {\left (b^3 c d-3 a b c^2 d-b^4 e+4 a b^2 c e-2 a^2 c^2 e\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 c^4} \\ & = -\frac {\left (b c d-b^2 e+a c e\right ) x}{c^3}+\frac {(c d-b e) x^2}{2 c^2}+\frac {e x^3}{3 c}+\frac {\left (b^2 c d-a c^2 d-b^3 e+2 a b c e\right ) \log \left (a+b x+c x^2\right )}{2 c^4}+\frac {\left (b^3 c d-3 a b c^2 d-b^4 e+4 a b^2 c e-2 a^2 c^2 e\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^4} \\ & = -\frac {\left (b c d-b^2 e+a c e\right ) x}{c^3}+\frac {(c d-b e) x^2}{2 c^2}+\frac {e x^3}{3 c}+\frac {\left (b^3 c d-3 a b c^2 d-b^4 e+4 a b^2 c e-2 a^2 c^2 e\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c}}+\frac {\left (b^2 c d-a c^2 d-b^3 e+2 a b c e\right ) \log \left (a+b x+c x^2\right )}{2 c^4} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.98 \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=\frac {-6 c \left (b c d-b^2 e+a c e\right ) x+3 c^2 (c d-b e) x^2+2 c^3 e x^3+\frac {6 \left (-b^3 c d+3 a b c^2 d+b^4 e-4 a b^2 c e+2 a^2 c^2 e\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}-3 \left (-b^2 c d+a c^2 d+b^3 e-2 a b c e\right ) \log (a+x (b+c x))}{6 c^4} \]
[In]
[Out]
Time = 0.26 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.08
method | result | size |
default | \(-\frac {-\frac {1}{3} e \,x^{3} c^{2}+\frac {1}{2} b c e \,x^{2}-\frac {1}{2} c^{2} d \,x^{2}+x a c e -b^{2} e x +b c d x}{c^{3}}+\frac {\frac {\left (2 a b c e -a \,c^{2} d -b^{3} e +b^{2} c d \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (a^{2} c e -a \,b^{2} e +a b c d -\frac {\left (2 a b c e -a \,c^{2} d -b^{3} e +b^{2} c d \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{c^{3}}\) | \(183\) |
risch | \(\text {Expression too large to display}\) | \(2940\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 563, normalized size of antiderivative = 3.33 \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=\left [\frac {2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} e x^{3} + 3 \, {\left ({\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d - {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} e\right )} x^{2} - 3 \, \sqrt {b^{2} - 4 \, a c} {\left ({\left (b^{3} c - 3 \, a b c^{2}\right )} d - {\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} e\right )} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) - 6 \, {\left ({\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d - {\left (b^{4} c - 5 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} e\right )} x + 3 \, {\left ({\left (b^{4} c - 5 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} d - {\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} e\right )} \log \left (c x^{2} + b x + a\right )}{6 \, {\left (b^{2} c^{4} - 4 \, a c^{5}\right )}}, \frac {2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} e x^{3} + 3 \, {\left ({\left (b^{2} c^{3} - 4 \, a c^{4}\right )} d - {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} e\right )} x^{2} + 6 \, \sqrt {-b^{2} + 4 \, a c} {\left ({\left (b^{3} c - 3 \, a b c^{2}\right )} d - {\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2}\right )} e\right )} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - 6 \, {\left ({\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} d - {\left (b^{4} c - 5 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} e\right )} x + 3 \, {\left ({\left (b^{4} c - 5 \, a b^{2} c^{2} + 4 \, a^{2} c^{3}\right )} d - {\left (b^{5} - 6 \, a b^{3} c + 8 \, a^{2} b c^{2}\right )} e\right )} \log \left (c x^{2} + b x + a\right )}{6 \, {\left (b^{2} c^{4} - 4 \, a c^{5}\right )}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 840 vs. \(2 (168) = 336\).
Time = 1.48 (sec) , antiderivative size = 840, normalized size of antiderivative = 4.97 \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=x^{2} \left (- \frac {b e}{2 c^{2}} + \frac {d}{2 c}\right ) + x \left (- \frac {a e}{c^{2}} + \frac {b^{2} e}{c^{3}} - \frac {b d}{c^{2}}\right ) + \left (- \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{2 c^{4} \cdot \left (4 a c - b^{2}\right )} + \frac {2 a b c e - a c^{2} d - b^{3} e + b^{2} c d}{2 c^{4}}\right ) \log {\left (x + \frac {- 3 a^{2} b c e + 2 a^{2} c^{2} d + a b^{3} e - a b^{2} c d + 4 a c^{4} \left (- \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{2 c^{4} \cdot \left (4 a c - b^{2}\right )} + \frac {2 a b c e - a c^{2} d - b^{3} e + b^{2} c d}{2 c^{4}}\right ) - b^{2} c^{3} \left (- \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{2 c^{4} \cdot \left (4 a c - b^{2}\right )} + \frac {2 a b c e - a c^{2} d - b^{3} e + b^{2} c d}{2 c^{4}}\right )}{2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d} \right )} + \left (\frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{2 c^{4} \cdot \left (4 a c - b^{2}\right )} + \frac {2 a b c e - a c^{2} d - b^{3} e + b^{2} c d}{2 c^{4}}\right ) \log {\left (x + \frac {- 3 a^{2} b c e + 2 a^{2} c^{2} d + a b^{3} e - a b^{2} c d + 4 a c^{4} \left (\frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{2 c^{4} \cdot \left (4 a c - b^{2}\right )} + \frac {2 a b c e - a c^{2} d - b^{3} e + b^{2} c d}{2 c^{4}}\right ) - b^{2} c^{3} \left (\frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{2 c^{4} \cdot \left (4 a c - b^{2}\right )} + \frac {2 a b c e - a c^{2} d - b^{3} e + b^{2} c d}{2 c^{4}}\right )}{2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d} \right )} + \frac {e x^{3}}{3 c} \]
[In]
[Out]
Exception generated. \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00 \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=\frac {2 \, c^{2} e x^{3} + 3 \, c^{2} d x^{2} - 3 \, b c e x^{2} - 6 \, b c d x + 6 \, b^{2} e x - 6 \, a c e x}{6 \, c^{3}} + \frac {{\left (b^{2} c d - a c^{2} d - b^{3} e + 2 \, a b c e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{4}} - \frac {{\left (b^{3} c d - 3 \, a b c^{2} d - b^{4} e + 4 \, a b^{2} c e - 2 \, a^{2} c^{2} e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c^{4}} \]
[In]
[Out]
Time = 10.15 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.31 \[ \int \frac {x^3 (d+e x)}{a+b x+c x^2} \, dx=x^2\,\left (\frac {d}{2\,c}-\frac {b\,e}{2\,c^2}\right )-x\,\left (\frac {b\,\left (\frac {d}{c}-\frac {b\,e}{c^2}\right )}{c}+\frac {a\,e}{c^2}\right )+\frac {\ln \left (c\,x^2+b\,x+a\right )\,\left (8\,e\,a^2\,b\,c^2-4\,d\,a^2\,c^3-6\,e\,a\,b^3\,c+5\,d\,a\,b^2\,c^2+e\,b^5-d\,b^4\,c\right )}{2\,\left (4\,a\,c^5-b^2\,c^4\right )}+\frac {e\,x^3}{3\,c}+\frac {\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )\,\left (2\,e\,a^2\,c^2-4\,e\,a\,b^2\,c+3\,d\,a\,b\,c^2+e\,b^4-d\,b^3\,c\right )}{c^4\,\sqrt {4\,a\,c-b^2}} \]
[In]
[Out]